import request from "@/utils/request";

//用户修改密码
export function updatePassword(token,password) {
  return request({
    method: "POST",
    url: "/userservice/user-info/updatePasswordByToken",
    headers: {
      "Content-Type": "application/json",
      // 添加 Authorization 头部，使用Bearer模式携带token
      "token": `${token}`,
    },
    data:{
      password
    }
  }).then((res) => res.data);
}

//获取token
export function login(data){
  return request({
      method: 'POST',
      url: '/userservice/user-info/login',
      headers: {
        'Content-Type': 'application/json'
      },
      data: data
    }).then(res => res.data)
}
